package com.jsr.demo.entity;

import lombok.Data;

import javax.validation.constraints.*;

/**
 * @ClassName User
 * @description: TODO
 * @author: 朱同学
 * @Date 2021/4/24 21:11
 **/
@Data
public class User {

    @NotBlank(message = "用户名不能为空！")
    private String userName;

    @Pattern(regexp = "^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{8,16}$", message = "密码必须为8~16个字母和数字组合")
    private String pwd;

    @Email
    private String email;

    @Min(18)
    @Max(100)
    private Integer age;

}
